<h1>Your Triggers</h1>
<% if !@triggers.empty? %>
<table>
  <tr>
    <th>Stock</th>
    <th>Quanitity</th>
    <th>Price</th>
    <th>Created At</th>
    <th>Action</th>
  </tr>

<% for trigger in @triggers %>
<% name, dummy = Ownership.details(trigger.stock_id) %>
  <tr>
    <td><%= link_to name, 	:controller => 'market',
    						:action => 'show',
    						:id		=> trigger.stock_id %></td>
    <td><%= trigger.quantity %></td>
    <td><%= trigger.price %></td>
    <td><%= trigger.created_at.to_formatted_s(:short) %></td>
    <td><b><%= trigger.action %></b></td>
	<td><%= link_to 'Delete', :controller => "triggers", :action => "delete", :id => trigger %></td>
  </tr>
<% end %>
</table>
<% else %>
<br /><h2>You have no Triggers set!</h2>

<% end %> 
<p>Visit the <%= link_to 'Market', 	:controller => 'market'%> to create Triggers!</p>
